package com.yiyi.credit.manage.abutment.mapper;

import com.yiyi.credit.manage.abutment.common.mapper.CommonMapper;
import com.yiyi.credit.manage.abutment.provider.DictProvider;
import com.yiyi.credit.manage.model.entity.DictInfo;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;

import java.util.List;
import java.util.Map;


public interface DictInfoMapper extends CommonMapper<DictInfo> {

    @Select(" select code,name,dict_code dictCode,dict_desc dictDesc from dict_info "
            + " where code = #{code} order by dict_code ")
    List<DictInfo> queryDictInfoByCode(Integer code);

    @SelectProvider(type = DictProvider.class, method = "select")
    List<Map<String, Object>> query(String s);

    @UpdateProvider(type = DictProvider.class, method = "select")
    int update(String s);

}
